feat: Adds embed_tokens, lm_head as trainable for vocab expansion in peft and enables tying of adapters#625
Merged
dushyantbehl merged 12 commits intoNov 24, 2025
Conversation
Signed-off-by: romit <romit@ibm.com>
|
Thanks for making a pull request! 😃 |
romitjain
commented
Oct 30, 2025
Signed-off-by: romit <romit@ibm.com>
romitjain
commented
Nov 4, 2025
romitjain
commented
Nov 4, 2025
Signed-off-by: romit <romit@ibm.com>
Signed-off-by: romit <romit@ibm.com>
romitjain
commented
Nov 7, 2025
romitjain
commented
Nov 7, 2025
Signed-off-by: romit <romit@ibm.com>
Collaborator
dushyantbehl
left a comment
There was a problem hiding this comment.
Change look okay...minor clarifications requested
…g into feat/embed-lmhead-tying-and-expansion
Signed-off-by: romit <romit@ibm.com>
Collaborator
Author
|
@dushyantbehl I have made changes based on your comments. For the PEFT patch, let's wait until they merge it. |
Signed-off-by: romit <romit@ibm.com>
romitjain
commented
Nov 24, 2025
| (["embed_tokens", "lm_head"], ["embed_tokens"]), | ||
| ], | ||
| ) | ||
| @pytest.mark.skip(reason="Not released in a tagged version of PEFT") |
Collaborator
Author
There was a problem hiding this comment.
This feature is not supported for v0.18.0
Collaborator
There was a problem hiding this comment.
Can we skip this based on the version of peft?
from packaging import version
@pytest.mark.skipif(
version.parse(peft.__version__) < version.parse("0.18.0"),
reason=f"Not released in PEFT <= 0.18.0"
)
Signed-off-by: romit <romit@ibm.com>
Signed-off-by: romit <romit@ibm.com>
Collaborator
|
Thanks @romitjain ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the change
embed_tokensandlm_headas trainable layersmodules_to_save, enable the flag to ensure weight tying between adapters of the tied layerstarget_modules, enable the flag to ensure weight tying between adapters of the tied layersRelated issue number
Closes https://github.ibm.com/ai-foundation/watson-fm-stack-tracker/issues/1673
How to verify the PR
For 1
For 2 and 3
Was the PR tested